package yxy.cherry.battle.module.selector;

import java.util.HashSet;
import java.util.Set;

import yxy.cherry.battle.Fighter;
import yxy.cherry.battle.Team;
import yxy.cherry.battle.module.affix.AffixContext;
import yxy.cherry.battle.module.affix.AffixContext.AffixAction;

public class TargetSelector_5_本轮击杀 extends TargetSelector {

	@Override
	public Set<Fighter> target(Fighter actor, Team team, int param1, int param2) {
		AffixAction affixAction = getAffixAction(actor);

		HashSet<Fighter> set = new HashSet<Fighter>();
		for (Fighter target : affixAction.get死掉的武将()) {
			if (!target.is活着()) {
				set.add(target);
			}
		}
		return set;
	}

	protected AffixAction getAffixAction(Fighter actor) {
		AffixContext affixContext = actor.getAffixContext();
		if (affixContext.is附加行动中()) {
			return affixContext.get附加行动();
		}
		return affixContext.get攻击行动();
	}
}
